<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
        <link rel="stylesheet" href="${pageContext.request.contextPath}/css/add.css" type="text/css">
        <script src="${pageContext.request.contextPath}/js/add_mr.js"></script>
        <script>
            if ('${success_add}' == 1) {
                alert("添加成功!!!");
            }
            if ('${success_modify}' == 1) {
                alert("修改成功!!!");
            }
        </script>
        <div class="table">
            <form action="addMR.action?action=add" method="POST" onsubmit="return submitPage()">
                <!-- 隐藏域 -->
                <input type="hidden" name="doc_name" value="${session_user.doc_name}">
                <h1>处方单</h1>
                <table id="table">
                    <tr>
                        <th>门诊/住院病历号:</th>
                        <td><input type="text" name="pl_number" id="pl_number" value="${list.pl_number}"
                                autocomplete="off">
                        </td>
                        <th>日期:</th>
                        <td><input type="date" name="pl_date" id="pl_date" value="${list.pl_date}" autocomplete="off">
                        </td>
                    </tr>
                    <tr>
                        <th>姓名:</th>
                        <td><input type="text" name="pl_name" id="pl_name" value="${list.pl_name}" autocomplete="off">
                        </td>
                        <th>性别:</th>
                        <td>
                            <span>男 </span><input type="radio" name="pl_sex" value="男" class="choice"
                                style="cursor: pointer;" checked>
                            <span>女 </span><input type="radio" name="pl_sex" value="女" class="choice"
                                style="cursor: pointer;">
                        </td>
                    </tr>
                    <tr>
                        <th>年龄:</th>
                        <td><input type="text" name="pl_age" style="width: 50px;" value="${list.pl_age}" id="pl_age"
                                onkeyup="value=value.replace(/[^\d]/g,'');" autocomplete="off"><span>岁</span></td>
                        <th>费别:</th>
                        <td>
                            <span>公 </span><input type="radio" name="pl_expensetype" id="pl_expensetype" value="公"
                                class="choice" style="cursor: pointer;" checked>
                            <span>自 </span><input type="radio" name="pl_expensetype" id="pl_expensetype" value="自"
                                class="choice" style="cursor: pointer;">
                            <span>保 </span><input type="radio" name="pl_expensetype" id="pl_expensetype" value="保"
                                class="choice" style="cursor: pointer;">
                        </td>
                    </tr>
                    <tr>
                        <th>临床诊断:</th>
                        <td><input type="text" name="pl_diagnosis" id="pl_diagnosis" value="${list.pl_diagnosis}"
                                autocomplete="off"></td>
                        <th>科别(病室及床号):</th>
                        <td><input type="text" name="pl_department" id="pl_department" value="${list.pl_department}"
                                autocomplete="off">
                        </td>
                    </tr>
                    <tr>
                        <th>Rp:</th>
                        <td colspan="3">
                            <textarea name="pl_rp" cols="70" rows="5" id="pl_rp"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <th>调配:</th>
                        <td><input type="text" name="pl_deployment" id="pl_deployment" value="${list.pl_deployment}"
                                autocomplete="off">
                        </td>
                        <th>复核:</th>
                        <td><input type="text" name="pl_review" id="pl_review" value="${list.pl_review}"
                                autocomplete="off"></td>
                    </tr>
                    <tr>
                        <th>药品金额:</th>
                        <td><input type="text" name="pl_amount" id="pl_amount" value="${list.pl_amount}"
                                autocomplete="off"></td>
                    </tr>
                </table>
                <div class="button">
                    <input type="submit" value="提交" onclick="submitPage('${list.id}',this.form)">
                    <c:if test="${list==null}">
                        <input type="reset" value="重置">
                        <input type="button" value="打印" id="print" onclick="printPage()">
                    </c:if>
                    <c:if test="${list!=null}">
                        <input type="button" value="返回" onclick="javascript:window.location='queryMR.action'">
                    </c:if>
                </div>
            </form>
            <div class="tips">
                <span id="error">${error}</span>
            </div>
        </div>
        <script>
            var rp = "${list.pl_rp}";
            document.getElementById("pl_rp").value = rp;
        </script>